﻿@{
    ViewBag.Title = "Index";
}

@section scripts{
    <script type="text/javascript">
        $(function () {
            $('#example').dataTable({
               // serverSide: true, //开启服务端模式
                processing: true,
                pagingType: "full_numbers", // 分页显示形式 首 上 下 末
                lengthChange: false,   //隐藏选择分页
                searching: false,        //隐藏搜索
                oLanguage: {
                    "sLengthMenu": "每页 _MENU_ 条记录",
                    "sZeroRecords": "没有检索到数据",
                    "sInfo": "第 _START_ 到第 _END_ 条数据；共有 _TOTAL_ 条记录",
                    "sInfoEmtpy": "没有数据",
                    "sProcessing": "正在加载数据...请耐心等待...",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "前页",
                        "sNext": "后页",
                        "sLast": "尾页"
                    }
                },
                scrollY: 375,
                scrollCollapse: false,
                ajax:{
                    url: "/User/GetUserList",
                    contentType: "application/json",
                    type: "POST",
                    dataSrc: "dataList",
                    data: function (d) {
                        return JSON.stringify(d);
                    }
                },
                columns: [
                    { data: 'UserName' },
                    { data: 'UserReallyname' },
                    { data: 'DepartmentID' },
                    { data: 'IsEnable' },
                    { data: 'CreateTime' },
                    { data: 'Remark' }
                ]
            });

        })
    </script>  
}

<div style="width:1000px;margin:0 auto">

    <div class="panel panel-default">
        <ul class="list-group">
            <li class="list-group-item">
                <button type="button" class="btn btn-default">
                    <span class="glyphicon glyphicon-plus" aria-hidden="true"></span> 新增
                </button>

                <button type="button" class="btn btn-default ">
                    <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> 编辑
                </button>

                <button type="button" class="btn btn-default ">
                    <span class="glyphicon glyphicon-remove" aria-hidden="true"></span> 删除
                </button>

                <button type="button" class="btn btn-default ">
                    <span class="glyphicon glyphicon-download" aria-hidden="true"></span> 下载
                </button>
            </li>
            <li class="list-group-item">
                <form class="form-inline">
                    <div class="form-group">
                        <label for="exampleInputName2">Name</label>
                        <input type="text" class="form-control" id="exampleInputName2" placeholder="Jane Doe">
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail2">Email</label>
                        <input type="email" class="form-control" id="exampleInputEmail2" placeholder="jane.doe@example.com">
                    </div>
                    <button type="button" class="btn btn-default ">
                        <span class="glyphicon glyphicon-search" aria-hidden="true"></span> 查询
                    </button>
                </form>
            </li>
        </ul>
    </div>

    <table id="example" class="table table-bordered table-striped" cellspacing="0" width="100%"></table>
    
</div>




